<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="menu" content="assetMenu" />
<meta name="nav" content="2" />
<meta name="acc" content="0" />
<base target="_self">
<title>工程项目列表</title>
<script>
	function retrunValue() {
		var $item = $("input[name='radio']:checked").val();
		var $item1 = $("input:checked").attr("id");
		var $math = $item1.substring(5, 6);
		var $projectName = $("#projName" + $math).html();
		window.returnValue = {
			id : $item,
			projName : $projectName
		};
		window.close();
	}
</script>
</head>
<body>
	<form action="project.action" method="post" id="mainForm" class="yform">
		<input type="hidden" name="page.pageNo" id="pageNo"
			value="${page.pageNo}" /> <input type="hidden" name="page.orderBy"
			id="orderBy" value="${page.orderBy}" /> <input type="hidden"
			name="page.order" id="order" value="${page.order}" />
		<div id="message">
			<s:actionmessage theme="custom" cssClass="success" />
		</div>
		<div id="content">
			<table id="contentTable">
				<tr>
					<th>选择</th>
					<th>项目编号</th>
					<th>项目名称</th>
					<th>起点名称</th>
					<th>止点名称</th>
					<th>起点桩号</th>
					<th>止点桩号</th>
				</tr>
				<c:forEach items="${page.result }" var="project" varStatus="var">
					<tr>
						<td><input type="radio" name="radio" id="radio${var.count }"
							value="<c:out value='${project.id}'/>" /></td>
						<td>${project.projCode }</td>
						<td id="projName${var.count }">${project.projName }</td>
						<td>${project.startPegName }</td>
						<td>${project.endPegName }</td>
						<td>${project.startPegNum }</td>
						<td>${project.endPegNum }</td>
					</tr>
				</c:forEach>
				<tr>
					<td colspan="7"><input type="button" onclick="retrunValue()"
						value="提交" /><input type="button"
						onclick="JavaScript:window.close();" value="关闭" />
					</td>
				</tr>
			</table>
		</div>
		<div id="pagebar">
			第${page.pageNo}页, 共${page.totalPages}页 <a
				href="javascript:jumpPage(1)">首页</a>
			<s:if test="page.hasPre">
				<a href="javascript:jumpPage(${page.prePage})">上一页</a>
			</s:if>
			<s:if test="page.hasNext">
				<a href="javascript:jumpPage(${page.nextPage})">下一页</a>
			</s:if>
			<a href="javascript:jumpPage(${page.totalPages})">末页</a>
		</div>
	</form>
</body>
</html>